home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
misc
/
pdflib
/
bindings
/
perl
/
pdflib.pm
< prev
Wrap
Text File
|
1999-01-01
|
16KB
|
609 lines
# This file was automatically generated by SWIG
package pdflib;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
package pdflibc;
bootstrap pdflib;
var_pdflib_init();
@EXPORT = qw( );
# ---------- BASE METHODS -------------
package pdflib;
sub TIEHASH {
my ($classname,$obj) = @_;
return bless $obj, $classname;
}
sub CLEAR { }
sub this {
my $ptr = shift;
return tied(%$ptr);
}
# ------- FUNCTION WRAPPERS --------
package pdflib;
sub PDF_get_info {
my @args = @_;
my $result = pdflibc::PDF_get_info(@args);
return undef if (!defined($result));
my %resulthash;
tie %resulthash, "PDF_info", $result;
return bless \%resulthash, "PDF_info";
}
sub PDF_open {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_open(@args);
return $result;
}
*PDF_close = *pdflibc::PDF_close;
*PDF_begin_page = *pdflibc::PDF_begin_page;
*PDF_end_page = *pdflibc::PDF_end_page;
*PDF_set_transition = *pdflibc::PDF_set_transition;
*PDF_set_duration = *pdflibc::PDF_set_duration;
*PDF_malloc = *pdflibc::PDF_malloc;
*PDF_free = *pdflibc::PDF_free;
*PDF_show = *pdflibc::PDF_show;
*PDF_show_xy = *pdflibc::PDF_show_xy;
*PDF_set_font = *pdflibc::PDF_set_font;
*PDF_set_leading = *pdflibc::PDF_set_leading;
*PDF_set_text_rise = *pdflibc::PDF_set_text_rise;
*PDF_set_horiz_scaling = *pdflibc::PDF_set_horiz_scaling;
*PDF_set_text_rendering = *pdflibc::PDF_set_text_rendering;
sub PDF_set_text_matrix {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_set_text_matrix(@args);
return $result;
}
*PDF_set_text_pos = *pdflibc::PDF_set_text_pos;
*PDF_set_char_spacing = *pdflibc::PDF_set_char_spacing;
*PDF_set_word_spacing = *pdflibc::PDF_set_word_spacing;
*PDF_continue_text = *pdflibc::PDF_continue_text;
*PDF_save = *pdflibc::PDF_save;
*PDF_restore = *pdflibc::PDF_restore;
*PDF_translate = *pdflibc::PDF_translate;
*PDF_scale = *pdflibc::PDF_scale;
*PDF_rotate = *pdflibc::PDF_rotate;
*PDF_setdash = *pdflibc::PDF_setdash;
*PDF_setpolydash = *pdflibc::PDF_setpolydash;
*PDF_setflat = *pdflibc::PDF_setflat;
*PDF_setlinejoin = *pdflibc::PDF_setlinejoin;
*PDF_setlinecap = *pdflibc::PDF_setlinecap;
*PDF_setmiterlimit = *pdflibc::PDF_setmiterlimit;
*PDF_setlinewidth = *pdflibc::PDF_setlinewidth;
*PDF_setgray_fill = *pdflibc::PDF_setgray_fill;
*PDF_setgray_stroke = *pdflibc::PDF_setgray_stroke;
*PDF_setgray = *pdflibc::PDF_setgray;
*PDF_setrgbcolor_fill = *pdflibc::PDF_setrgbcolor_fill;
*PDF_setrgbcolor_stroke = *pdflibc::PDF_setrgbcolor_stroke;
*PDF_setrgbcolor = *pdflibc::PDF_setrgbcolor;
*PDF_moveto = *pdflibc::PDF_moveto;
*PDF_lineto = *pdflibc::PDF_lineto;
*PDF_curveto = *pdflibc::PDF_curveto;
*PDF_circle = *pdflibc::PDF_circle;
*PDF_arc = *pdflibc::PDF_arc;
*PDF_rect = *pdflibc::PDF_rect;
*PDF_closepath = *pdflibc::PDF_closepath;
*PDF_stroke = *pdflibc::PDF_stroke;
*PDF_closepath_stroke = *pdflibc::PDF_closepath_stroke;
*PDF_fill = *pdflibc::PDF_fill;
*PDF_fill_stroke = *pdflibc::PDF_fill_stroke;
*PDF_closepath_fill_stroke = *pdflibc::PDF_closepath_fill_stroke;
*PDF_endpath = *pdflibc::PDF_endpath;
*PDF_clip = *pdflibc::PDF_clip;
sub PDF_place_image {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_place_image(@args);
return $result;
}
sub PDF_place_inline_image {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_place_inline_image(@args);
return $result;
}
sub PDF_put_image {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_put_image(@args);
return $result;
}
sub PDF_execute_image {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_execute_image(@args);
return $result;
}
sub PDF_close_image {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_close_image(@args);
return $result;
}
sub PDF_open_JPEG {
my @args = @_;
my $result = pdflibc::PDF_open_JPEG(@args);
return undef if (!defined($result));
my %resulthash;
tie %resulthash, "PDF_image", $result;
return bless \%resulthash, "PDF_image";
}
sub PDF_close_JPEG {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_close_JPEG(@args);
return $result;
}
sub PDF_open_TIFF {
my @args = @_;
my $result = pdflibc::PDF_open_TIFF(@args);
return undef if (!defined($result));
my %resulthash;
tie %resulthash, "PDF_image", $result;
return bless \%resulthash, "PDF_image";
}
sub PDF_close_TIFF {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_close_TIFF(@args);
return $result;
}
sub PDF_open_GIF {
my @args = @_;
my $result = pdflibc::PDF_open_GIF(@args);
return undef if (!defined($result));
my %resulthash;
tie %resulthash, "PDF_image", $result;
return bless \%resulthash, "PDF_image";
}
sub PDF_close_GIF {
my @args = @_;
$args[1] = tied(%{$args[1]});
my $result = pdflibc::PDF_close_GIF(@args);
return $result;
}
*PDF_data_source_from_buf = *pdflibc::PDF_data_source_from_buf;
*PDF_stringwidth = *pdflibc::PDF_stringwidth;
*PDF_add_outline = *pdflibc::PDF_add_outline;
*fopen = *pdflibc::fopen;
*fclose = *pdflibc::fclose;
############# Class : PDF_pagesize ##############
package PDF_pagesize;
@ISA = qw( pdflib );
%OWNER = ();
%BLESSEDMEMBERS = (
);
%ITERATORS = ();
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
delete $OWNER{$ptr};
};
sub ACQUIRE {
my $self = shift;
my $ptr = tied(%$self);
$OWNER{$ptr} = 1;
};
sub FETCH {
my ($self,$field) = @_;
my $member_func = "pdflibc::PDF_pagesize_${field}_get";
my $val = &$member_func($self);
if (exists $BLESSEDMEMBERS{$field}) {
return undef if (!defined($val));
my %retval;
tie %retval,$BLESSEDMEMBERS{$field},$val;
return bless \%retval, $BLESSEDMEMBERS{$field};
}
return $val;
}
sub STORE {
my ($self,$field,$newval) = @_;
my $member_func = "pdflibc::PDF_pagesize_${field}_set";
if (exists $BLESSEDMEMBERS{$field}) {
&$member_func($self,tied(%{$newval}));
} else {
&$member_func($self,$newval);
}
}
sub FIRSTKEY {
my $self = shift;
$ITERATORS{$self} = ['width', 'height', ];
my $first = shift @{$ITERATORS{$self}};
return $first;
}
sub NEXTKEY {
my $self = shift;
$nelem = scalar @{$ITERATORS{$self}};
if ($nelem > 0) {
my $member = shift @{$ITERATORS{$self}};
return $member;
} else {
$ITERATORS{$self} = ['width', 'height', ];
return ();
}
}
############# Class : PDF_info ##############
package PDF_info;
@ISA = qw( pdflib );
%OWNER = ();
%BLESSEDMEMBERS = (
);
%ITERATORS = ();
*Producer = *pdflibc::PDF_info_Producer;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
delete $OWNER{$ptr};
};
sub ACQUIRE {
my $self = shift;
my $ptr = tied(%$self);
$OWNER{$ptr} = 1;
};
sub FETCH {
my ($self,$field) = @_;
my $member_func = "pdflibc::PDF_info_${field}_get";
my $val = &$member_func($self);
if (exists $BLESSEDMEMBERS{$field}) {
return undef if (!defined($val));
my %retval;
tie %retval,$BLESSEDMEMBERS{$field},$val;
return bless \%retval, $BLESSEDMEMBERS{$field};
}
return $val;
}
sub STORE {
my ($self,$field,$newval) = @_;
my $member_func = "pdflibc::PDF_info_${field}_set";
if (exists $BLESSEDMEMBERS{$field}) {
&$member_func($self,tied(%{$newval}));
} else {
&$member_func($self,$newval);
}
}
sub FIRSTKEY {
my $self = shift;
$ITERATORS{$self} = ['binary_mode', 'required_compatibility', 'Keywords', 'Subject', 'ModDate', 'Title', 'CreationDate', 'Creator', 'Author', 'fontpath', ];
my $first = shift @{$ITERATORS{$self}};
return $first;
}
sub NEXTKEY {
my $self = shift;
$nelem = scalar @{$ITERATORS{$self}};
if ($nelem > 0) {
my $member = shift @{$ITERATORS{$self}};
return $member;
} else {
$ITERATORS{$self} = ['binary_mode', 'required_compatibility', 'Keywords', 'Subject', 'ModDate', 'Title', 'CreationDate', 'Creator', 'Author', 'fontpath', ];
return ();
}
}
############# Class : PDF_matrix ##############
package PDF_matrix;
@ISA = qw( pdflib );
%OWNER = ();
%BLESSEDMEMBERS = (
);
%ITERATORS = ();
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
delete $OWNER{$ptr};
};
sub ACQUIRE {
my $self = shift;
my $ptr = tied(%$self);
$OWNER{$ptr} = 1;
};
sub FETCH {
my ($self,$field) = @_;
my $member_func = "pdflibc::PDF_matrix_${field}_get";
my $val = &$member_func($self);
if (exists $BLESSEDMEMBERS{$field}) {
return undef if (!defined($val));
my %retval;
tie %retval,$BLESSEDMEMBERS{$field},$val;
return bless \%retval, $BLESSEDMEMBERS{$field};
}
return $val;
}
sub STORE {
my ($self,$field,$newval) = @_;
my $member_func = "pdflibc::PDF_matrix_${field}_set";
if (exists $BLESSEDMEMBERS{$field}) {
&$member_func($self,tied(%{$newval}));
} else {
&$member_func($self,$newval);
}
}
sub FIRSTKEY {
my $self = shift;
$ITERATORS{$self} = ['a', 'b', 'c', 'd', 'e', 'f', ];
my $first = shift @{$ITERATORS{$self}};
return $first;
}
sub NEXTKEY {
my $self = shift;
$nelem = scalar @{$ITERATORS{$self}};
if ($nelem > 0) {
my $member = shift @{$ITERATORS{$self}};
return $member;
} else {
$ITERATORS{$self} = ['a', 'b', 'c', 'd', 'e', 'f', ];
return ();
}
}
############# Class : PDF_data_source_s ##############
package PDF_data_source_s;
@ISA = qw( pdflib );
%OWNER = ();
%BLESSEDMEMBERS = (
);
%ITERATORS = ();
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
delete $OWNER{$ptr};
};
sub ACQUIRE {
my $self = shift;
my $ptr = tied(%$self);
$OWNER{$ptr} = 1;
};
sub FETCH {
my ($self,$field) = @_;
my $member_func = "pdflibc::PDF_data_source_s_${field}_get";
my $val = &$member_func($self);
if (exists $BLESSEDMEMBERS{$field}) {
return undef if (!defined($val));
my %retval;
tie %retval,$BLESSEDMEMBERS{$field},$val;
return bless \%retval, $BLESSEDMEMBERS{$field};
}
return $val;
}
sub STORE {
my ($self,$field,$newval) = @_;
my $member_func = "pdflibc::PDF_data_source_s_${field}_set";
if (exists $BLESSEDMEMBERS{$field}) {
&$member_func($self,tied(%{$newval}));
} else {
&$member_func($self,$newval);
}
}
sub FIRSTKEY {
my $self = shift;
$ITERATORS{$self} = ['next_byte', 'bytes_available', 'buffer_start', 'buffer_length', 'private_data', ];
my $first = shift @{$ITERATORS{$self}};
return $first;
}
sub NEXTKEY {
my $self = shift;
$nelem = scalar @{$ITERATORS{$self}};
if ($nelem > 0) {
my $member = shift @{$ITERATORS{$self}};
return $member;
} else {
$ITERATORS{$self} = ['next_byte', 'bytes_available', 'buffer_start', 'buffer_length', 'private_data', ];
return ();
}
}
############# Class : PDF_image ##############
package PDF_image;
@ISA = qw( pdflib );
%OWNER = ();
%BLESSEDMEMBERS = (
);
%ITERATORS = ();
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);
delete $OWNER{$ptr};
};
sub ACQUIRE {
my $self = shift;
my $ptr = tied(%$self);
$OWNER{$ptr} = 1;
};
sub FETCH {
my ($self,$field) = @_;
my $member_func = "pdflibc::PDF_image_${field}_get";
my $val = &$member_func($self);
if (exists $BLESSEDMEMBERS{$field}) {
return undef if (!defined($val));
my %retval;
tie %retval,$BLESSEDMEMBERS{$field},$val;
return bless \%retval, $BLESSEDMEMBERS{$field};
}
return $val;
}
sub STORE {
my ($self,$field,$newval) = @_;
my $member_func = "pdflibc::PDF_image_${field}_set";
if (exists $BLESSEDMEMBERS{$field}) {
&$member_func($self,tied(%{$newval}));
} else {
&$member_func($self,$newval);
}
}
sub FIRSTKEY {
my $self = shift;
$ITERATORS{$self} = ['fp', 'filename', 'width', 'height', 'bpc', 'components', 'compression', 'colorspace', 'indexed', 'BitPixel', 'colormap', 'adobe', 'startpos', 'dpi', 'Background', 'transparent', 'delayTime', 'inputFlag', 'disposal', 'useGlobalColormap', 'bitPixel', 'interlace', 'imageno', 'no', 'src', ];
my $first = shift @{$ITERATORS{$self}};
return $first;
}
sub NEXTKEY {
my $self = shift;
$nelem = scalar @{$ITERATORS{$self}};
if ($nelem > 0) {
my $member = shift @{$ITERATORS{$self}};
return $member;
} else {
$ITERATORS{$self} = ['fp', 'filename', 'width', 'height', 'bpc', 'components', 'compression', 'colorspace', 'indexed', 'BitPixel', 'colormap', 'adobe', 'startpos', 'dpi', 'Background', 'transparent', 'delayTime', 'inputFlag', 'disposal', 'useGlobalColormap', 'bitPixel', 'interlace', 'imageno', 'no', 'src', ];
return ();
}
}
# ------- VARIABLE STUBS --------
package pdflib;
*PDFLIB_VERSION = *pdflibc::PDFLIB_VERSION;
*PDF_DEFAULT_FONT_PATH = *pdflibc::PDF_DEFAULT_FONT_PATH;
*false = *pdflibc::false;
*true = *pdflibc::true;
*PDF_INFO = *pdflibc::PDF_INFO;
*PDF_WARN = *pdflibc::PDF_WARN;
*PDF_FATAL = *pdflibc::PDF_FATAL;
*PDF_INTERNAL = *pdflibc::PDF_INTERNAL;
*PDF1_0 = *pdflibc::PDF1_0;
*PDF1_1 = *pdflibc::PDF1_1;
*PDF1_2 = *pdflibc::PDF1_2;
*builtin = *pdflibc::builtin;
*pdfdoc = *pdflibc::pdfdoc;
*macroman = *pdflibc::macroman;
*macexpert = *pdflibc::macexpert;
*winansi = *pdflibc::winansi;
*encoding_count = *pdflibc::encoding_count;
*none = *pdflibc::none;
*lzw = *pdflibc::lzw;
*runlength = *pdflibc::runlength;
*ccitt = *pdflibc::ccitt;
*dct = *pdflibc::dct;
*flate = *pdflibc::flate;
*compression_count = *pdflibc::compression_count;
*trans_none = *pdflibc::trans_none;
*trans_split = *pdflibc::trans_split;
*trans_blinds = *pdflibc::trans_blinds;
*trans_box = *pdflibc::trans_box;
*trans_wipe = *pdflibc::trans_wipe;
*trans_dissolve = *pdflibc::trans_dissolve;
*trans_glitter = *pdflibc::trans_glitter;
*trans_replace = *pdflibc::trans_replace;
*transition_count = *pdflibc::transition_count;
*DeviceGray = *pdflibc::DeviceGray;
*DeviceRGB = *pdflibc::DeviceRGB;
*DeviceCMYK = *pdflibc::DeviceCMYK;
*CalGray = *pdflibc::CalGray;
*CalRGB = *pdflibc::CalRGB;
*Lab = *pdflibc::Lab;
*Indexed = *pdflibc::Indexed;
*Pattern = *pdflibc::Pattern;
*Separation = *pdflibc::Separation;
*colorspace_count = *pdflibc::colorspace_count;
my %__a0_hash;
tie %__a0_hash,"PDF_pagesize", $pdflibc::a0;
$a0= \%__a0_hash;
bless $a0, PDF_pagesize;
my %__a1_hash;
tie %__a1_hash,"PDF_pagesize", $pdflibc::a1;
$a1= \%__a1_hash;
bless $a1, PDF_pagesize;
my %__a2_hash;
tie %__a2_hash,"PDF_pagesize", $pdflibc::a2;
$a2= \%__a2_hash;
bless $a2, PDF_pagesize;
my %__a3_hash;
tie %__a3_hash,"PDF_pagesize", $pdflibc::a3;
$a3= \%__a3_hash;
bless $a3, PDF_pagesize;
my %__a4_hash;
tie %__a4_hash,"PDF_pagesize", $pdflibc::a4;
$a4= \%__a4_hash;
bless $a4, PDF_pagesize;
my %__a5_hash;
tie %__a5_hash,"PDF_pagesize", $pdflibc::a5;
$a5= \%__a5_hash;
bless $a5, PDF_pagesize;
my %__a6_hash;
tie %__a6_hash,"PDF_pagesize", $pdflibc::a6;
$a6= \%__a6_hash;
bless $a6, PDF_pagesize;
my %__b5_hash;
tie %__b5_hash,"PDF_pagesize", $pdflibc::b5;
$b5= \%__b5_hash;
bless $b5, PDF_pagesize;
my %__letter_hash;
tie %__letter_hash,"PDF_pagesize", $pdflibc::letter;
$letter= \%__letter_hash;
bless $letter, PDF_pagesize;
my %__legal_hash;
tie %__legal_hash,"PDF_pagesize", $pdflibc::legal;
$legal= \%__legal_hash;
bless $legal, PDF_pagesize;
my %__ledger_hash;
tie %__ledger_hash,"PDF_pagesize", $pdflibc::ledger;
$ledger= \%__ledger_hash;
bless $ledger, PDF_pagesize;
my %__p11x17_hash;
tie %__p11x17_hash,"PDF_pagesize", $pdflibc::p11x17;
$p11x17= \%__p11x17_hash;
bless $p11x17, PDF_pagesize;
1;